﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Model;
using System.Data;
namespace DAL
{
    public class 登录界面DAL
    {
        public static object Denglu() {
            string sql = "select COUNT(*) from Admins where UserID = @UserID and UserPwd = @UserPwd";
            List<SqlParameter> list = new List<SqlParameter>()
            {
                new SqlParameter("@UserID",Admins.UserID),
                new SqlParameter("@UserPwd",Admins.UserPwd)
            };
            return DBHelper.Chadanzhi(sql,list.ToArray());
        }
        public static DataSet YonghuName() {
            string sql = "select UserCompellation from Admins where UserID = @UserID";
            List<SqlParameter> list = new List<SqlParameter>()
            {
                new SqlParameter("@UserID",Admins.UserID)
            };
            return DBHelper.Duankaishi(sql, list.ToArray());
        }
        
    }
}
